home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / NEWTEXTF / SOURCE_C / CTONEWHA.C < prev    next >
C/C++ Source or Header  |  1990-08-25  |  298b  |  16 lines

  1. #include "MyLibrary.h"
  2.  
  3.         Handle    CToNewHandle (char *cstr)
  4.  
  5.             {Handle        hndl;
  6.             long        length;
  7.  
  8.             length = CLength (cstr);
  9.             hndl = NewHandle (++length);
  10.             if (hndl == (Handle) 0)
  11.                 return (hndl);
  12.             MoveHHi (hndl);
  13.             HLock (hndl);
  14.             CToC (cstr, *hndl);
  15.             HUnlock (hndl);
  16.             return (hndl);}